package com.bsoft.gol.hcs.common.entity;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

@Entity
@Table(name = "fus_operative_record", catalog = "")
public class FusOperativeRecord {
    private long recordId;
    private long medicalRecordsId;
    private String operativeRecordId;
    private String operativeName;
    private Date operativeTime;
    private Date gmtCreate;
    private Date gmtModified;

    @Id
    @Column(name = "record_id")
    public long getRecordId() {
        return recordId;
    }

    public void setRecordId(long recordId) {
        this.recordId = recordId;
    }

    @Basic
    @Column(name = "medical_records_id")
    public long getMedicalRecordsId() {
        return medicalRecordsId;
    }

    public void setMedicalRecordsId(long medicalRecordsId) {
        this.medicalRecordsId = medicalRecordsId;
    }

    @Basic
    @Column(name = "operative_record_id")
    public String getOperativeRecordId() {
        return operativeRecordId;
    }

    public void setOperativeRecordId(String operativeRecordId) {
        this.operativeRecordId = operativeRecordId;
    }

    @Basic
    @Column(name = "operative_name")
    public String getOperativeName() {
        return operativeName;
    }

    public void setOperativeName(String operativeName) {
        this.operativeName = operativeName;
    }

    @Basic
    @Column(name = "operative_time")
    public Date getOperativeTime() {
        return operativeTime;
    }

    public void setOperativeTime(Date operativeTime) {
        this.operativeTime = operativeTime;
    }

    @Basic
    @Column(name = "gmt_create")
    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    @Basic
    @Column(name = "gmt_modified")
    public Date getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(Date gmtModified) {
        this.gmtModified = gmtModified;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        FusOperativeRecord that = (FusOperativeRecord) o;
        return recordId == that.recordId &&
                medicalRecordsId == that.medicalRecordsId &&
                Objects.equals(operativeRecordId, that.operativeRecordId) &&
                Objects.equals(operativeName, that.operativeName) &&
                Objects.equals(operativeTime, that.operativeTime) &&
                Objects.equals(gmtCreate, that.gmtCreate) &&
                Objects.equals(gmtModified, that.gmtModified);
    }

    @Override
    public int hashCode() {
        return Objects.hash(recordId, medicalRecordsId, operativeRecordId, operativeName, operativeTime, gmtCreate, gmtModified);
    }
}
